
import React, { Component } from "react";
import './index.css'
class MyHeader extends Component {
    keyUp = (event)=>{
        let {target,keyCode} = event
        if(keyCode===13) return
        console.log(event.target.value,event.keyCode)
    }
    render(){
        return (<div className="header-container">
            <input onKeyUp={this.keyUp} type="text" placeholder="请输入" className="inp"></input>
            <input type="button" value="搜索" className="btn"></input>
        </div>)
    }
}
export default MyHeader